<!DOCTYPE html>
<html>
<head>
  <title>SVG.js</title>
  <script src="svg.min.js"></script>  
</head>

<body>
  <div id="drawing" style="background:lightgreen"></div>
</body>
</html>





<script>

if ( !  SVG.supported) {  
  alert('SVG not supported');
}

var gdraw = SVG('drawing').size(500, 500);                    // 创建一个 SVG.Doc 
var grect = gdraw.rect(100, 100).attr({ fill: '#f06' })     //







// http://www.zhangxinxu.com/GitHub/demo-Snap.svg/demo/basic/Element.parent.php
</script>